package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.StrategyLike;
import cn.wolfcode.trip.base.mapper.StrategyLikeMapper;
import cn.wolfcode.trip.base.service.IStrategyLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StrategyLikeServiceImpl implements IStrategyLikeService {

    @Autowired
    private StrategyLikeMapper strategyLikeMapper;

    @Override
    public StrategyLike queryLike(Long strategyId, Long userId) {
        StrategyLike strategyLike = strategyLikeMapper.selectLike(strategyId, userId);

        return strategyLike;
    }

    @Override
    public void insert(StrategyLike entity) {
        strategyLikeMapper.insert(entity);
    }

    @Override
    public void deleteLike(Long strategyId, Long userId) {
        strategyLikeMapper.deleteLike(strategyId, userId);
    }
}
